home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-04-08 | 763 b | 22 lines | [TEXT/ToyS] |
- on SaveChanges(theType, theName)
- set dItems to [¬
- {class:push button, bounds:[330, 80, 390, 100], name:"Save"}, ¬
- {class:push button, bounds:[250, 80, 310, 100], name:"Cancel"}, ¬
- {class:push button, bounds:[68, 80, 158, 100], name:"Don’t Save"}, ¬
- {class:icon, bounds:[13, 10, 45, 42], contents:2}, ¬
- {class:static text, bounds:[68, 10, 390, 58], contents:"Save changes to the " & ¬
- theType & " “" & theName & "” before closing?"}]
-
- set dlog to dd auto dialog {size:[400, 110], contents:dItems} with greyscale
-
- if item 1 of dlog then
- return "Save"
- else if item 2 of dlog then
- return "Cancel"
- else if item 3 of dlog then
- return "Don’t Save"
- end if
- error -128
- end SaveChanges
-
- SaveChanges("test document", "Dialog Director (data file)")